﻿const { Cart } = require('../../../model/cart');

module.exports = (req, res) => {
  console.log('req.body', req.body)
  console.log('req.query', req.query)
  const { id } = req.body
  Cart.deleteOne({_id: id}, (err, row) => {
    console.log('err', err)
    if(!err) {
      res.json({
        message: '删除成功!'
      })
    } else {
      res.status(403)
      res.json({
        log: err,
        message: '删除失败！'
      })
    }
  })
}